package com.myjob.handlerImpl;

import com.myjob.config.Constants;
import com.myjob.config.MjServiceName;
import com.myjob.dto.Oauth2TokenDto;
import com.myjob.response.Result;
import com.nimbusds.jwt.JWT;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.*;

import java.security.Principal;
import java.util.Map;

/**
 * @author Chen Yuan
 * @create 2021-03-24  10:09
 */
@Component
//@RequestMapping
@FeignClient(value= MjServiceName.UAA, fallback =AuthHandlerHystrix.class )
public interface AuthHandler {

	@PostMapping(value ="/oauth/token")
	public String getToken(Principal principal, @RequestParam Map<String, String> parameters);
}
